// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.inventory.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.inventory.entity.InventoryBatchNo;
import com.fowo.api.inventory.model.InventoryBatchNoItemVo;
import com.fowo.api.inventory.model.InventoryBatchNoSearchParamPo;
import com.fowo.api.inventory.model.InventoryBatchNoVo;
import java.util.Date;
import java.util.List;

import com.fowo.api.inventory.model.InventoryOutboundVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface InventoryBatchNoMapper extends BaseMapper<InventoryBatchNo> {
  Page<InventoryBatchNoItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") InventoryBatchNoSearchParamPo search
  );
  List<OptionItem<InventoryBatchNoItemVo>> searchOptions(
    @Param("search") InventoryBatchNoSearchParamPo search
  );
  List<InventoryBatchNoItemVo> search(
    @Param("search") InventoryBatchNoSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") InventoryBatchNoSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") InventoryBatchNoSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") InventoryBatchNoSearchParamPo search);
  Long getIdByBatchNo(@Param("batchNo") String batchNo);

  List<Long> getIdsByBatchNo(@Param("list") List<String> list);

  String getBatchNoById(@Param("id") Long id);

  List<String> getBatchNoByIds(@Param("ids") List<Long> ids);
  InventoryBatchNoVo selectVoById(@Param("id") Long id);

  /**
   *
   * @param model
   * @param value
   * @return
   */
  List<InventoryBatchNo> selectByOutboundList(@Param("search")InventoryOutboundVo model, @Param("model")String value);

    List<InventoryBatchNo> selectByStorageList(@Param("items")List<Long> items);

    int updateBatch(@Param("list")List<InventoryBatchNo> updateInventoryBatchNoList);
}
